package com.hissy.cn.controller;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangyanfei
 * @date 2019/11/28
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document
public class User implements Serializable {
    @JsonProperty("user_name")
    private String userName;
    @JsonProperty("id_id")
    @Id
    private int id;
    @JsonProperty("brd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;
}
